package cn.edu.scau.cmi.linkaibo.simpleFactoryMethod;

import cn.edu.scau.cmi.linkaibo.simpleFactoryMethod.domain.*; 

public class MeatFactory { 
public static Meat getMeat(String meatTypeString) { 

 Meat meat=null; 
 String typeString=meatTypeString.toLowerCase(); 

 switch(typeString) { 
  case "beef": 
   meat=new Beef(); 
   break; 
  case "pork": 
   meat=new Pork(); 
   break; 
  case "chicken": 
   meat=new Chicken(); 
   break; 
 } 
 return meat; 
} 
}